A virtual machine (VM) is a portion of software that, when executed on appropriate hardware, creates an environment allowing the virtualization of an actual physical computer system (e.g., a server, a mainframe computer, etc.). The actual physical computer system is typically referred to as a “host machine,” and the operating system (OS) of the host machine is typically referred to as the “host operating system.” Typically, software on the host machine known as a “hypervisor” (or a “virtual machine monitor”) manages the execution of one or more virtual machines or “guests”, providing a variety of functions such as virtualizing and allocating resources, context switching among virtual machines, etc. The operating system (OS) of the virtual machine is typically referred to as the “guest operating system.” A virtual machine may comprise one or more “virtual processors” (or VCPUs), each of which maps, possibly in a many-to-one fashion, to a central processing unit (CPU) of the host machine.
A guest OS of a virtual machine can manage multi-threaded applications by apportioning work across multiple VCPUs. While a task is being executed by one VCPU, the guest OS may send a notification to a second VCPU to assist in processing the task. This may involve some form of exit mechanism to the hypervisor to facilitate the cross-VCPU notification by transferring control to the hypervisor.